사이트 내 전체검색
ngrep-1.41 네트워크 sniff tool 설치와 활용텅날개
최고관리자
https://cmd.kr/server/749 URL이 복사되었습니다.

본문

멋진걸...~~ 활용가치가 높다,,

ngrep은 tcpdump와 더불어 네트워크를 sniff하는 도구이다.

------ ngrep홈페이지 (http://ngrep.sourceforge.net) -------

하지만 tcpdump는 packet의 경로와 특성만을 sniffer 하는 반면

ngrep은 특정 포트로 접속한 IP가 어떤 파일을 보고 있는지 어떤 data를

전달하는지도 sniffer 할수 있는 강력한 도구이다.

보안은 항상 양면성을 가지고 있듯이 이것도 잘쓰면 자신이 관리하는

서버를 지키는 도구가 되지만, 악용되면, 다른 사람의 정보를 유출할수

있는 악성 도구가 되므로 주의해서 사용하기 바란다.

이것은 tcpdump와 마찬가지로 패킷을 캡춰하는 libpcap 라이브러리가

필요하므로, 설치전에 미리 libpcap을 install 해야 한다.

libpcap의 최신 버전은 http://www.tcpdump.org/release/ 이곳에서 다운

받을수 있으며, rpm으로 설치를 원할경우 7.3용 최신 패키지를 링크를

걸어 두도록 하겠다.

ngrep을 rpm패키지를 만들때 /usr/bin/ngrep 으로 실행파일이 들어가도록
  rpm을 만들었으므로 자동으로 패스에 잡힐것이다.

ngrep 간단한 사용법은 다음과 같다.

=======
ngrep -qd eth0 port 80
(포트 80으로 접속하는 패킷을 캡춰하며, webport이므로 어떤 웹페이지를

보고있는지 확인한다)

ngrep -qd eth0 'HTTP' port 80
(위와 같으나 ,' HTTP'문자가 들어간 라인만을 캡춰한다.)

여기에는 not을 사용함으로써 그 반대의 경우를 캡춰할수 있다.

=======

다음은 ngrep의 README 의 일부이다.

  ==========
Usage:

  ngrep <-hXViwqpevxlDtT> <-IO pcap_dump> <-n num> <-d dev> <-A num>
                          <-s snaplen> <-S limitlen> <match expression>
                          <bpf filter>

  -h  is help/usage
  -X  is interpret match expression as hexadecimal
  -V  is version information
  -i  is ignore case
  -w  is word-regex (expression must match as a word)
  -q  is be quiet
  -p  is don't go into promiscuous mode
  -e  is show empty packets
  -v  is invert match
  -x  is print in alternate hexdump format
  -l  is make stdout line buffered
  -D  is replay pcap_dumps with their recorded time intervals
  -t  is print timestamp every time a packet is matched
  -T  is print delta timestamp every time a packet is matched
  -s  is set the bpf caplen
  -S  is set the limitlen on matched packets
  -O  is dump matched packets in pcap format to pcap_dump
  -I  is read packet stream from pcap format file pcap_dump
  -n  is look at only num packets
  -d  is use a device different from the default (pcap)
  -A  is dump num packets after a match

  <match expression>   is either an extended regular expression or a
                       hexadecimal string.  see the man page for more
                       information.

  <bpf filter>         is any bpf filter statement.
===========

댓글목록

등록된 댓글이 없습니다.

1,139 (23/23P)

Search

Copyright © Cmd 명령어 3.20.203.230